<%@ page contentType='text/html; charset=iso-8859-1' language="java"%>
<%@ page pageEncoding="UTF-8"%>
<%@ include file="../WEB-INF/jspf/acesso.jspf" %>
<%@ include file="../WEB-INF/jspf/setMeta.jspf" %>

<sql:query var='rsetFornecedor' dataSource='${con}'>    
    SELECT Fornecedor.nome FROM Fornecedor 
    WHERE idFornecedor = ${param.chv1}
</sql:query>

<sql:query var='rsetLog' dataSource='${con}'>    
    SELECT * FROM LogSGCA
    WHERE LogSGCA.acao
    LIKE '%${rsetFornecedor.rowsByIndex[0][0]}%'
</sql:query>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>Hist&oacute;rico do Fornecedor</title>
<link rel="stylesheet" type="text/css" href="./stilos.css" />

</head>

<body>

<form name="form1" method="post" action="">
  <fieldset>
  <legend><font color="#0000FF"><strong>Hist&oacute;rico do Fornecedor</strong></font></legend>
  <p>&nbsp;</p>
  <table width="100%" border="1">
    <tr bgcolor="#00CCFF"> 
      <td width="66%" ><div align="center"><strong>Hist&oacute;rico do Fornecedor - ${rsetFornecedor.rowsByIndex[0][0]}.</strong></div></td>
    </tr>
    <tr> 
      <td height="20"><div align="center">
          <table width="100%">
            <tr> 
              <td colspan="4" bgcolor="#CCCCCC">&nbsp;</td>
            </tr>            
            <tr> 
              <td colspan="4">&nbsp;</td>
            </tr>
              <td colspan="4"><table width="100%" border="1">
                  <tr bgcolor="#CCCCCC"> 
                    <td width="8%"> <div align="center"><strong>Data</strong></div></td>
                    <td width="8%"> <div align="center"><strong>Hora</strong></div></td>
                    <td width="34%"> <div align="center"><strong>Respons&aacute;vel</strong></div></td>
                    <td width="50%"> <div align="center"><strong>A&ccedil;&atilde;o</strong></div></td>
                  </tr>
                  <c:forEach var="row" items="${rsetLog.rowsByIndex}">
                      <tr> 
                          <td>${row[5]}</td>
                          <td>${row[6]}</td>
                          <td>${row[1]}</td>
                          <td>${row[7]}</td>
                      </tr>
                  </c:forEach>
                </table></td>
            </tr>
            <tr> 
              <td width="15%">&nbsp;</td>
              <td width="11%">&nbsp;</td>
              <td width="29%">&nbsp;</td>
              <td width="45%">&nbsp;</td>
            </tr>
            <tr> 
              <td colspan="4" bgcolor="#CCCCCC">&nbsp;</td>
            </tr>
          </table>
        </div></td>
    </tr>
    <tr> 
      <td > <div align="right"></div>
        <table width="100%">
          <tr> 
            <td width="28%"><div align="right"></div></td>
            <td width="22%"> <div align="center"> </div></td>
            <td width="26%"><div align="center"> </div></td>
            <td width="24%"> <div align="center"> 
                <input type="button" name="Submit" value="  Fechar  " onclick="javascript:window.close();" />
              </div></td>
          </tr>
        </table>
        <div align="left"></div>
        <div align="left"></div>
        <div align="center"> </div></td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp; </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  </fieldset>
</form>

</body>
</html>
